import {esri, esriLoader, loadArcgisAPI} from "./api/esriAPI";
import {ManageView} from "./view/ManageView";
import {ManageLayer} from "./layer/ManageLayer";
import {ManageEcharts} from "./Extend/echarts/ManageEcharts";
import {ManageGeometry} from "./geometry/ManageGeometry";
import {ManageWidget} from "./widget/ManageWidget";
import {ManageQuery} from "./query/ManageQuery";
import {mapLinkage} from "./mapLinkage/mapLinkage";

class ArcgisTool {
  mapId = null;
  manageView = null;
  manageLayer = null;
  manageEcharts = null;
  manageGeometry = null;
  manageWidget = null;

  constructor(mapId) {
    this.mapId = mapId;//地图的DOM对象的id
    this.manageView = new ManageView(mapId);//管理view-----> mapView  或者 SceneView的相关操作
    this.manageLayer = new ManageLayer(this.manageView);//管理所有的图层
    this.manageEcharts = new ManageEcharts(this.manageView);
    this.manageGeometry = new ManageGeometry(this.manageLayer);
    this.manageWidget = new ManageWidget(this.manageView, this.manageLayer);
    this.manageQuery = new ManageQuery(this.manageLayer);
  }

  // applyMapView(map){
  //   this.view.applyMapView(map)
  // }
  // applySceneView(map){
  //   this.view.applySceneView(map)
  // }
  // flyToXY(x,y,zoomOrZ){
  //   this.view.flyToXY(x,y,zoomOrZ)
  // }
  // switchView(visible){
  //   this.view.switchView(visible)
  // }
  // bind2D_3D(status){
  //   this.view.bind2D_3D(status)
  // }

}

export {esri, esriLoader, loadArcgisAPI, ArcgisTool, mapLinkage}
